package com.pickgliss.loader
{
	import flash.utils.Dictionary;

	public class LoaderHeaderList
	{
		public function LoaderHeaderList()
		{
		}
		public static var avatarShowNamePos : Dictionary = new Dictionary();
		private static var _items : Dictionary = new Dictionary(true);
		private static const doesNotExistResource :String = "DOES_NOT_EXIST";
		
		public static function addItem(key:String,load : BaseLoader) :void
		{
			_items[key] = load;
		}
		public static function deleteItem(key : String) : void
		{
			delete _items[key];
			_items[key] = true;
		}
		public static function addPath(path : String) : void
		{
			_items[path] = true;
		}
		public static function resourceDoesNotExist(path : String):Boolean
		{
			return (_items[path] == doesNotExistResource);
		}
		public static function set doesNotExist(path : String): void
		{
			delete _items[path];
			_items[path] = doesNotExistResource;
		}
		public static function hasLoader(path : String) : Boolean
		{
			return _items[path];
		}
		public static function getLoadByUrl(url : String) : BaseLoader
		{
			return _items[url] as BaseLoader;
		}
	}
}